<template>
	<view class="container">
		<view class="box">
			<view class="fs34 col10 fwb pb20">客户注册手机号<text class="fs34 red">*</text></view>
			
			<input v-model="mobile" maxlength="11" placeholder="请输入注册手机号" class="fs24 p20 t1 mt20 br10" placeholder-class="col89" />
			
			
		</view>
		<view @tap="submit" class="btn1 btn-pri">确定</view>
	</view>
</template>

<script>
	const app = getApp();

	const functions = require('../../../utils/functions.js');
	export default {
		data() {
			return {
				appoint_log_id: 0,
				can_house_state_arr: null,
				followList: [],
				pickerIndex: -1,
				
				mobile:''
			};
		},
		onLoad: function(options) {


		},
		methods: {
			// 提交
			submit() {
				var that = this;
				let mobile = that.mobile;
				if(mobile==''){
					functions.toast('手机号错误');
					return false;
				}
				var json = {
					mobile: mobile
				};
				functions.checkLogin(function(ret) {
					if (ret) {
						//继续提交
						functions.submitAjaxData(that, '/api/xiluhouse/appoint/create_appoint', json, function(res) {
							let pages = getCurrentPages(); // 页面栈数组，第一个元素为首页，最后一个元素为当前页面。
							let prevPage = pages[pages.length - 2]; // 上一页
							prevPage.$vm.has_change=true;
							functions.showSuccess(res.msg,function(){
								// uni.navigateTo({
								// 	url:'/pages/member/my_clients_detail/my_clients_detail?id='+that.appoint_log_id
								// })
								uni.navigateBack();
							});
						});
					} else {
						functions.toast('请先登录');
					}
				});
			}
		}
	}
</script>

<style lang="less" scoped>
	.btn1 {
		margin: 40rpx auto 0;
		width: 100%;
	}

	.container {
		padding-top: 30rpx;
		padding-left: 40rpx;
		padding-right: 40rpx;
	}

	.box {
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 30rpx 0rpx rgba(184, 189, 202, 0.3);
		padding: 36rpx 30rpx 30rpx;

		.form_item {
			height: 75rpx;
			background: #F6F7FA;
			padding: 0 53rpx 0 20rpx;

			&::after {
				right: 20rpx;
			}
		}
	}

	textarea {
		background: #F6F7FA;
		width: 100%;
	}

	.t1 {
		height: 123rpx;
	}

	.t2 {
		height: 180rpx;
	}

	.up_box {
		background: #F6F7FA;
	}

	.img_box {
		width: 130rpx;
		height: 130rpx;
		background: #FFFFFF;
		border-radius: 5rpx;
		position: relative;
		margin-right: 16rpx;
		font-size: 24rpx;
		color: #B8BDCA;

		.close {
			width: 27rpx;
			height: 27rpx;
			position: absolute;
			top: -13rpx;
			right: -13rpx;
			z-index: 2;
		}

		.img {
			width: 100%;
			height: 100%;
			position: relative;
			z-index: 1;
		}

		&:nth-of-type(4) {
			margin-right: 0;
		}

		.icon_up {
			width: 36rpx;
			height: 32rpx;
			margin-bottom: 4rpx;
		}
	}
</style>
